<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript">
        var num = parseFloat(prompt("请您输入一个数字"))
        for (var i = 1; i <= num; i++) {
            if(num % i == 0) {
                console.log(i + "是" + num + "的约数");
            }
        }
    </script>
</head>

<body>
</body>

</html>